import { NodeRoot } from "../Base/NodeRoot";
import { NMNode } from "../Base/NodeGraph";
@NMNode
export class InterruptNode extends NodeRoot{
    onEnter(){
        let outputEdges=this.parent.getOutEdges(this);
        console.log("InterruptNode",outputEdges);
        if(outputEdges){
            for (const outputEdge of outputEdges) {
                if(outputEdge.outputFieldName=="Interrupt"){
                    let interruptNode=this.parent.getNode(outputEdge.inputNodeGUID);
                    console.log("打断节点",interruptNode);
                    interruptNode.onExit();
                    this.parent.removeUpdateNode(interruptNode);
                }
            }
        }
    }
}